package com.cet.qz.unit01.chapter1_2;

import java.util.Arrays;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-02-08 22:38
 **/
public class Vector {
    private  final double[] coords;

    public Vector(double[] coords) {
        this.coords = coords;
    }

    @Override
    public String toString() {
        return "Vector{" +
                "coords=" + Arrays.toString(coords) +
                '}';
    }

    public static void main(String[] args) {
        double[] a = {1.0,2.0};
        Vector vector = new Vector(a);
        a[0] = 0.0;
        System.out.println(vector);
    }
}
